/*
 * main.cc
 *
 *  Created on: Sept 2012
 *      Author: jsramosp
 */

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include <libplayerc++/playerc++.h>
#include "args.h"


int main(int argc, char** argv)
{

  using namespace PlayerCc;
  parse_args(argc, argv);

  printf("Please hold target directly in front of camera until AmigoBot begins to move...\n");

  try
  {
	  /* Connect to the Player server */
	  PlayerClient robot(gHostname, gPort);
	  BlobfinderProxy bp(&robot);
	  Position2dProxy pp(&robot);
	  sleep(1);

	  /* Turn off the motors */
	  pp.SetMotorEnable(0);

  }
  
  catch (PlayerError e)
  {
    std::cerr << e << std::endl;
    return -1;
  }

  return 1;
}
